home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2641 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  5.7 KB

  1. Path: Hermes.grace.irl.cri.nz!maths!peterm
  2. From: peterm@maths.grace.cri.nz (Peter McGavin)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Demo/game to OS friendly part II
  5. Date: 03 Feb 1996 01:32:20 GMT
  6. Organization: Industrial Research Ltd
  7. Distribution: world
  8. Message-ID: <PETERM.96Feb3143220@tui.maths.irl.cri.nz>
  9. References: <john.hendrikx.4ai4@grafix.xs4all.nl>
  10. NNTP-Posting-Host: tui.grace.cri.nz
  11. In-reply-to: john.hendrikx@grafix.xs4all.nl's message of Tue, 30 Jan 96
  12.     18:51:40 GMT+1
  13.  
  14. john.hendrikx@grafix.xs4all.nl (John Hendrikx) writes:
  15. >In a message of 29 Jan 96 Peter McGavin wrote to All:
  16. > PM> Personally I would like to see what seems a completely opposite approach
  17. > PM> (for RTG).  That is, I think gfx should be implemented something like
  18. > PM> DOS.  Gfx primitives like Draw(), SetAPen(), Text(), etc, internally
  19. > PM> should use message-passing and packets.  The Amiga has a big advantage
  20. > PM> over other platforms that messages don't have to be copied. 
  21. >
  22. >This advantage is likely to go away in the near future with a new OS
  23. >version or soon after that.  AT would be wise not to rely too much on
  24. >these 'side-effects' of a system which is not memory-protected.
  25.  
  26. I have to admit I'm skeptical about AT "adding" memory protection to
  27. AmigaOS.  It seems to me that full memory protection would either
  28. double the size of AmigaOS or make AmigaOS almost totally incompatible
  29. with existing Amiga software.  In the former case AmigaOS loses its
  30. size advantage over other OSes.  In the latter case we'd might as well
  31. move to another OS.  In both cases AmigaOS loses its performance edge
  32. over other OSes.
  33.  
  34. If AT are serious about implementing full memory protection then I
  35. think a straightforward approach is:
  36.  
  37.   o  Throw away exec and all device-drivers.  Start again with the
  38.      kernel and device drivers from another OS like Unix, WinNT or
  39.      some research OS instead.
  40.  
  41.   o  Tweak the interface to look as much like exec as possible within
  42.      the constraints of full memory protection.
  43.  
  44.   o  Port other libraries.  Graphics, DOS and maybe other libraries,
  45.      require a major redesign and rewrite because they can no longer
  46.      use public structures.
  47.  
  48.   o  Port WorkBench, shell commands, prefs, as many applications as
  49.      possible, etc.
  50.  
  51. OK another approach, that would be just as (in)compatible, is to
  52. implement an AmigaOS lookalike API over Unix or WinNT.  About the only
  53. thing that might be impossible this way (and possible by the first
  54. approach) is the concept of multiple simultaneous Screens in different
  55. resolutions and frequencies.
  56.  
  57. Either approach would probably take years longer than a straight port
  58. of AmigaOS to PPC and practically all compatibility with existing
  59. software would be lost.
  60.  
  61. > PM>     [...]Another scenario is that the application
  62. > PM>     queues only a few, large operations, such as a single, large,
  63. > PM>     WritePixelArray8() which operates with async DMA and uses no
  64. > PM>     CPU time.  Thus, gfx coprocessors and DMA can be better
  65. > PM>     utilised;
  66. >
  67. >The blitter is a good example of this in Amiga right now.  It is
  68. >async, when you draw a line with the blitter usign DrawLine() there is
  69. >no guarantee that when the function returns that the line is already
  70. >drawn.  You have to wait for the blitter to make sure.
  71.  
  72. Yes, but I think there are several problems with the current
  73. implementation.  WaitBlit() only waits for the Amiga blitter, so there
  74. are problems implementing async drivers for gfx-cards with other
  75. coprocessors.  Apps can't synchronise reliably.  WaitBlit() is
  76. CPU-intensive for large blits.  Multi-plane operations often wait
  77. internally for all except the last plane instead of queuing the
  78. operation and returning immediately.
  79.  
  80. > PM>  o  Gfx redirection across networks would be relatively trivial
  81. > PM>     (much like X11).
  82. >
  83. >Well, this would be none too hard even in the current system if NOBODY
  84. >used the hardware but used the provided functions.  These could then
  85. >be patched to pass on their info to another machine via a network.
  86.  
  87. I don't want to see network software using SetFunction().  It would be
  88. much better for networks to plug in at the gfx-card device-driver
  89. interface, or maybe at some intermediate layer.
  90.  
  91. > PM>  o  It is more straightforward to share the same hardware between
  92. > PM>     multiple tasks this way.
  93. >
  94. >Yes, but it would also involve passing a message for each gfx-action,
  95.  
  96. I should have mentioned in my earlier post that a single message could
  97. request many gfx operations.
  98.  
  99. >while the current system, although less straightforward can just queu
  100. >gfx-actions in a list (some current blitter functions do this) which
  101. >achieves much the same effect.
  102.  
  103. I can't tell whether you're talking about QBlit() or high-level gfx
  104. functions here.  QBlit() is too low-level because it insists on poking
  105. hardware registers.  Ability to queue high-level functions is what I'm
  106. talking about.  In the current implementation, only one high-level
  107. function can be queued at a time, unless the application starts a task
  108. to process longer queues.  Why not let the OS do this and save the
  109. programmer the trouble?
  110.  
  111. >I think RTG will do what you want just fine, what you're suggesting
  112. >would just make things even slower although it has some advantages.
  113.  
  114. We're talking about different implementations of RTG here aren't we?
  115. not RTG vs non-RTG.  Indeed, maybe your framebuffer allocation isn't
  116. RTG and message-passing is!  A message-passing implementation won't
  117. always be slower, quite often faster.
  118.  
  119. I think the system could incorporate both methods.  However a program
  120. which uses framebuffer-allocation and direct hardware access will only
  121. work properly on memory-mapped devices (in the right format).  It
  122. won't work on things like OpalVision (which isn't memory-mapped) or
  123. networks (except perhaps with slow emulation).
  124. -- 
  125. Peter McGavin.   (p.mcgavin@irl.cri.nz)
  126.